package net.zjitc.ChouXiang;

/**
 * @Author admin
 * @Date 2019/3/20 10:32
 */
public class Circle extends Shape {
    double r;

    public Circle(){

    }
    public Circle(double r){
        this.r=r;
    }
    @Override
    public double area(){
        return Math.PI*r*r;
    }
    @Override
    public String getName(){
        return "圆";
    }
    @Override
    public void output(){
        System.out.println(getName()+"的面积是："+area());
    }
}
